<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 500px;
            height: 200px;
            overflow: hidden;
            margin: 200px auto;
        }
        img {
            display: block;
            height: 100%;
            /* 记住一句话: 谁做过渡给谁加,别加到父元素上去了 */
            transition: all 0.2s linear;
        }

        img:hover {
           
            transform: scale(1.2);
        }
    </style>
</head>

<body>
    <div>
        <!-- 这个图片链接是小韩从网上随便拉的，你可以换成你想要的 -->
        <img
            src="https://uploadstatic.mihoyo.com/puzzle/upload/puzzle/2022/09/23/4f38f8dcf9a9edb020e920fcdc34c4c3_2879764323151677973.png?x-oss-process=image/format,webp/quality,Q_90">
    </div>
</body>

</html>